﻿// 1.1.5.09. We are given 5 integer numbers. Write a program that checks if the sum of some subset of them is 0.
// Example: 3, -2, 1, 1, 8  1+1-2=0.

using System;

class SubsetsSumZeroWithIfs
{
    static void Main()
    {
        Begin:
        int firstUserInput = int.Parse(Console.ReadLine());
        int secondUserInput = int.Parse(Console.ReadLine());
        int thirdUserInput = int.Parse(Console.ReadLine());
        int fourthUserInput = int.Parse(Console.ReadLine());
        int fifthUserInput = int.Parse(Console.ReadLine());
        Console.WriteLine();
        if (firstUserInput == 0)
        {
            Console.WriteLine(firstUserInput);
        }
        if (secondUserInput == 0)
        {
            Console.WriteLine(secondUserInput);
        }
        if (thirdUserInput == 0)
        {
            Console.WriteLine(thirdUserInput);
        }
        if (fourthUserInput == 0)
        {
            Console.WriteLine(fourthUserInput);
        }
        if (fifthUserInput == 0)
        {
            Console.WriteLine(fifthUserInput);
        }
        if (firstUserInput + secondUserInput == 0)
        {
            Console.WriteLine(firstUserInput + " " + secondUserInput);
        }
        if (firstUserInput + thirdUserInput == 0)
        {
            Console.WriteLine(firstUserInput + " " + thirdUserInput);
        }
        if (firstUserInput + fourthUserInput == 0)
        {
            Console.WriteLine(firstUserInput + " " + fourthUserInput);
        }
        if (firstUserInput + fifthUserInput == 0)
        {
            Console.WriteLine(firstUserInput + " " + fifthUserInput);
        }
        if (secondUserInput + thirdUserInput == 0)
        {
            Console.WriteLine(secondUserInput + " " + thirdUserInput);
        }
        if (secondUserInput + fourthUserInput == 0)
        {
            Console.WriteLine(secondUserInput + " " + fourthUserInput);
        }
        if (secondUserInput + fifthUserInput == 0)
        {
            Console.WriteLine(secondUserInput + " " + fifthUserInput);
        }
        if (thirdUserInput + fourthUserInput == 0)
        {
            Console.WriteLine(thirdUserInput + " " + fourthUserInput);
        }
        if (thirdUserInput + fifthUserInput == 0)
        {
            Console.WriteLine(thirdUserInput + " " + fifthUserInput);
        }
        if (fourthUserInput + fifthUserInput == 0)
        {
            Console.WriteLine(fourthUserInput + " " + fifthUserInput);
        }
        if (firstUserInput + secondUserInput + thirdUserInput == 0)
        {
            Console.WriteLine(firstUserInput + " " + secondUserInput + " " + thirdUserInput);
        }
        if (firstUserInput + secondUserInput + fourthUserInput == 0)
        {
            Console.WriteLine(firstUserInput + " " + secondUserInput + " " + fourthUserInput);
        }
        if (firstUserInput + secondUserInput + fifthUserInput == 0)
        {
            Console.WriteLine(firstUserInput + " " + secondUserInput + " " + fifthUserInput);
        }
        if (secondUserInput + thirdUserInput + fourthUserInput == 0)
        {
            Console.WriteLine(secondUserInput + " " + thirdUserInput + " " + fourthUserInput);
        }
        if (thirdUserInput + fourthUserInput + fifthUserInput == 0)
        {
            Console.WriteLine(thirdUserInput + " " + fourthUserInput + " " + fifthUserInput);
        }
        if (firstUserInput + secondUserInput + thirdUserInput + fourthUserInput == 0)
        {
            Console.WriteLine(firstUserInput + " " + secondUserInput + " " + thirdUserInput + " " + fourthUserInput);
        }
        if (secondUserInput + thirdUserInput + fourthUserInput + fifthUserInput == 0)
        {
            Console.WriteLine(secondUserInput + " " + thirdUserInput + " " + fourthUserInput + " " + fifthUserInput);
        }
        if (firstUserInput + secondUserInput + thirdUserInput + fourthUserInput + fifthUserInput == 0)
        {
            Console.WriteLine(firstUserInput + " " + secondUserInput + " " + thirdUserInput + " " + fourthUserInput + " " + fifthUserInput);
        }
        Console.WriteLine();
        goto Begin;
    }
}